Structured recursion for non-uniform data-types

نویسنده

  • Paul Alexander Blampied
چکیده

Recursion is a simple but powerful programming technique used extensively in functional languages. For a number of reasons, however, it is often desirable to use structured forms of recursion in programming, encapsulated in so-called recursion operators, in preference to unrestricted recursion. In particular, using recursion operators has proved invaluable for transforming and reasoning about functional programs. The recursion operators map and fold are well-understood for uniform datatypes, and recent work on applications of non-uniform data-types has motivated extending these recursion operators to non-uniform data-types as well. Previous work on defining recursion operators for non-uniform data-types has been hampered by expressibility problems caused by parametric polymorphism. In this thesis, we show how these problems can be solved by taking a new approach, based upon the idea of “algebra families”. We show how these recursion operators can be realized in the functional language Haskell, and present a categorical semantics that supports formal reasoning about programs on non-uniform data-types.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Towards Polytypic Parallel Programming

Data parallelism is currently one of the most successful models for programming massively parallel computers. The central idea is to evaluate a uniform collection of data in parallel by simultaneously manipulating each data element in the collection. Despite many of its promising features, the current approach su ers from two problems. First, the main parallel data structures that most data par...

متن کامل

Anonymous (co)inductive types: A way for structured recursion to cohabit with modular abstraction

We investigate the interaction between structured recursion combinators and modularization in the style of Standard ML. When built-in structured recursion combinators are straightforwardly added to a language like SML’97 or OCaml, they cannot operate over values of abstractly specified types. Consequently, when a program is modularized in an abstract and fine-grained way, the structured recursi...

متن کامل

Metamorphic Programming Structured Recursion for Abstract Data Types

We extend the structured recursive programming discipline which favors the use of fold operations in place of general re cursion to abstract data types The key idea is to represent an ADT by two parts a constructor and a destructor which are essentially functions to from a common representation Then a fold can work on an ADT by applying parameter functions to values that are delivered by the AD...

متن کامل

Haskell Programming with Nested Types: A Principled Approach

Initial algebra semantics is one of the cornerstones of the theory of modern functional programming languages. For each inductive data type, it provides a Church encoding for that type, a build combinator which constructs data of that type, a fold combinator which encapsulates structured recursion over data of that type, and a fold/build rule which optimises modular programs by eliminating from...

متن کامل

Haskell Programming with Nested Types : A Principled

Initial algebra semantics is one of the cornerstones of the theory of modern functional programming languages. For each inductive data type, it provides a Church encoding for that type, a build combinator which constructs data of that type, a fold combinator which encapsulates structured recursion over data of that type, and a fold/build rule which optimises modular programs by eliminating from...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2000